﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SampleCardAdd.aspx.cs" Inherits="PPAP.Web.Part.SampleCardAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head >
    <title></title>
    <script src="../Common/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body  style="font-family: Arial, Helvetica, sans-serif;" >
<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <form id="form1" runat="server">
       <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Always" runat="server"><ContentTemplate>
    <div>
     
    <table width="100%">
        
           
            <tr>
                <td>
                    <asp:GridView ID="GridView1" runat="server" CellPadding="4" Width="100%" ForeColor="#333333"
                        GridLines="None" AutoGenerateColumns="False" DataKeyNames="ID" 
                        onrowdatabound="GridView1_RowDataBound">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Select" ItemStyle-HorizontalAlign="Center">
                                <HeaderTemplate>
                                    <asp:CheckBox ID="cbAll" runat="server" AutoPostBack="True" 
                                        oncheckedchanged="cbAll_CheckedChanged" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                   <asp:CheckBox ID="cbSe" runat="server" AutoPostBack="True" 
                                        oncheckedchanged="cbSe_CheckedChanged" />
                                </ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="SN" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%#Eval("rownum") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Sample card" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%#Eval("TESTITEMNAME") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Contact person" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:DropDownList ID="DropDownList1" runat="server" 
                                        Enabled="false" CssClass='<%#Eval("ID") %>'>
                                    </asp:DropDownList>
                                    <%--<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                        SelectMethod="GetUserForTest" TypeName="PPAP.BO.TestDepartmentBO">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="GridView1" Name="testdepartment" 
                                                  Type="String" PropertyName="DataKeyNames" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>--%>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Due date">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox1" Enabled="false"  Text='<%#DateTime.Now.AddDays(14).DayOfWeek.ToString() == "Saturday" ? DateTime.Now.AddDays(16).ToString("yyyy-MM-dd") : DateTime.Now.AddDays(14).DayOfWeek.ToString() == "Sunday" ? DateTime.Now.AddDays(15).ToString("yyyy-MM-dd") : DateTime.Now.AddDays(14).ToString("yyyy-MM-dd") %>' onclick="WdatePicker();" runat="server"></asp:TextBox>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>

                        </Columns>
                        <EditRowStyle BackColor="#2E8AC5" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#2E8AC5" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </td>
            </tr>
            <tr><td align="center">
            <asp:Button ID="btnSubmit" CssClass="button" runat="server" Text="Submit" 
                    onclick="btnSubmit_Click" 
                    onclientclick="return confirm('Are you sure you want to submit?');" />
            </td></tr>
            </table>
    </div>
     </ContentTemplate></asp:UpdatePanel>
    </form>
</body>
</html>
